package writtenexamination.duxiaoman;

import java.util.Scanner;
import java.util.jar.JarEntry;

/**
 * @author cyt
 * @create 2020-09-20 下午 8:55
 */
public class B {
    static int m, n;
    static String[] ans;
    static int x, y;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int cnt = sc.nextInt();
        while (cnt > 0) {
            int n = sc.nextInt();
            int m = sc.nextInt();
            String[] ans = new String[m + 1];
            for (int i = 1; i <= n; i++) {
                ans[i] = sc.next();
            }
            for (int i = 1; i <= n; i++) {
                String an = ans[i];
                char[] chars = an.toCharArray();
                for (int j = 0; j < chars.length; j++) {
                    if (chars[j] == '@') {
                        System.out.println(i + " - > " + j);
                        x = i;
                        y = j;
                        dfs(x, y, ans);
                    }
                }
            }
            cnt--;
        }
    }


    public static void dfs(int x, int y, String[] ans) {



    }
}
